home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / SML⁄NJ 93+ / Documentation / MacDoc93+ / !930802errs.text next >
Encoding:
Text File  |  1993-08-02  |  6.1 KB  |  187 lines  |  [TEXT/KAHL]

  1. 02Aug93  e
  2.  
  3. Attached are updates to several files for the Mac version of 
  4. SML/NJ 93. These files add no features, fix no bugs. So why
  5. am I sending them to you?
  6.  
  7. Compiling SML/NJ v93 with ThinkC 6.0 lead to several problems.
  8. Most of these were solved quite easily. Almost all of the errors
  9. are the result of ThinkC 6's stronger prototype enforcement for
  10. Mac traps and are fixed with casts. The edited files are attached.
  11. Below is a list of the compiler errors, as produced by ThinkC 6,
  12. and new versions of the lines in error. <<file !930802errs.text>>
  13.  
  14. I also made a change in cfuns.c where the preprocessor condition 
  15. (THINK_C < 5) was added as follows:
  16.  
  17. #ifdef THINK_C
  18. #if (THINK_C < 5)
  19. struct stat {
  20.     int foo;
  21. };
  22. static int ___lstat (char *s, struct stat *buf)
  23.     {
  24. }
  25. static int ____fstat (int fd,  struct stat *buf)
  26.     {
  27. }
  28. #endif
  29. #endif
  30.  
  31. I would like this to have been (THINK_C < 6), but although the 
  32. documentation says that THINK_C is 6 in this version, the 
  33. documentation lies. Except for this change, all of the files 
  34. should be backward compatable with ThinkC 5. Note that the 
  35. Symantec ANSI library now supports stat(), so it will be easier
  36. to add several of the cfuns next time around.
  37.  
  38. I also needed to remake the ANSI-ML project. This went without incident.
  39. I needed to placed it in a folder inside src along with an alias to the 
  40. "Symantec C++ for the Mac" folder, but I don't recall why. If you run 
  41. into trouble you might give this a try as well.
  42.  
  43. e
  44.  
  45. ===================================================================================
  46. File “os_mac.c”; Line 341
  47. Error:   first argument to function ‘PBHGetFInfo’ does not match prototype
  48. =-=
  49.           err = PBHGetFInfo( (HParmBlkPtr )&pb, FALSE );
  50. ===
  51. File “os_mac.c”; Line 350
  52. Error:   first argument to function ‘PBHSetFInfo’ does not match prototype
  53. =-=
  54.             PBHSetFInfo( (HParmBlkPtr )&pb, FALSE );
  55. ===
  56. File “os_mac.c”; Line 606
  57. Error:   argument to function ‘DisposPtr’ does not match prototype
  58. =-=
  59.     { DisposPtr( (Ptr )wind_table[id].filename ); wind_table[id].filename = NULL; }
  60. ===
  61. File “os_mac.c”; Line 956
  62. Error:   argument #5 to function ‘SFGetFile’ does not match prototype
  63. =-=
  64. SFTypeList ftypes;
  65.   SFGetFile( SFGwhere, prompt, 0L, nbtypes, ftypes, 0L, &reply );
  66. ===
  67. File “os_mac.c”; Line 1578
  68. Error:   first argument to function ‘SetCtlValue’ does not match prototype
  69. =-=
  70.   SetCtlValue( (ControlHandle )h, find_wrap );
  71. ===
  72. File “os_mac.c”; Line 1580
  73. Error:   first argument to function ‘SetCtlValue’ does not match prototype
  74. =-=
  75.   SetCtlValue( (ControlHandle )h, find_ci );
  76. ===
  77. File “os_mac.c”; Line 1592
  78. Error:   argument to function ‘GetCtlValue’ does not match prototype
  79. =-=
  80.         find_wrap = GetCtlValue( (ControlHandle )h );
  81. ===
  82. File “os_mac.c”; Line 1594
  83. Error:   argument to function ‘GetCtlValue’ does not match prototype
  84. =-=
  85.         find_ci   = GetCtlValue( (ControlHandle )h );
  86. ===
  87. File “os_mac.c”; Line 1658
  88. Error:   last argument to function ‘GetItem’ does not match prototype
  89. =-=
  90.       { GetItem(menus[appleM], theItem, name);
  91. ===
  92. File “os_mac.c”; Line 1659
  93. Error:   argument to function ‘OpenDeskAcc’ does not match prototype
  94. =-=
  95.         OpenDeskAcc( name );
  96. ===================================================================================
  97. File “os_mac_console.c”; Line 93
  98. Error:   argument to function ‘SelectWindow’ does not match prototype
  99. =-=
  100.         SelectWindow( (WindowPtr )wp );
  101. ===
  102. File “os_mac_console.c”; Line 94
  103. Error:   argument to function ‘ShowWindow’ does not match prototype
  104. =-=
  105.     ShowWindow( (WindowPtr )wp );
  106. ===================================================================================
  107. File “os_mac_eStyle.c”; Line 262
  108. Error:   second argument to function ‘NewMenu’ does not match prototype
  109. =-=
  110.   hM = NewMenu( id, "\p" );
  111. ===
  112. File “os_mac_eStyle.c”; Line 350
  113. Error:   argument to function ‘DisposHandle’ does not match prototype
  114. =-=
  115.   if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
  116. ===
  117. File “os_mac_eStyle.c”; Line 359
  118. Error:   argument to function ‘DisposHandle’ does not match prototype
  119. =-=
  120.   if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
  121. ===
  122. File “os_mac_eStyle.c”; Line 385
  123. Error:   argument to function ‘DisposHandle’ does not match prototype
  124. =-=
  125.     if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
  126. ===
  127. File “os_mac_eStyle.c”; Line 396
  128. Error:   argument to function ‘DisposHandle’ does not match prototype
  129. =-=
  130.     if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
  131. ===
  132. File “os_mac_eStyle.c”; Line 520
  133. Error:   argument #4 to function ‘GetDItem’ does not match prototype
  134. =-=
  135.   GetDItem( dbox, item, &itemtype, (Handle *)&hC, &itemrect);
  136. ===
  137. File “os_mac_eStyle.c”; Line 561
  138. Error:   argument to function ‘DisposHandle’ does not match prototype
  139. =-=
  140.   if( popMenu1 ) DisposHandle( (Handle )popMenu1 );
  141. ===
  142. File “os_mac_eStyle.c”; Line 563
  143. Error:   argument to function ‘DisposHandle’ does not match prototype
  144. =-=
  145.   if( popMenu2 ) DisposHandle( (Handle )popMenu2 );
  146. ===
  147. File “os_mac_eStyle.c”; Line 565
  148. Error:   argument to function ‘DisposHandle’ does not match prototype
  149. =-=
  150.   if( popMenu3 ) DisposHandle( (Handle )popMenu3 );
  151. ===
  152. File “os_mac_eStyle.c”; Line 567
  153. Error:   argument to function ‘DisposHandle’ does not match prototype
  154. =-=
  155.   if( popMenu4 ) DisposHandle( (Handle )popMenu4 );
  156. ===
  157. File “os_mac_eStyle.c”; Line 581
  158. Error:   second argument to function ‘NewMenu’ does not match prototype
  159. =-=
  160.   popMenu1 = NewMenu( popMenuID1, "\p" );
  161. ===
  162. File “os_mac_eStyle.c”; Line 587
  163. Error:   second argument to function ‘NewMenu’ does not match prototype
  164. =-=
  165.   popMenu2 = NewMenu( popMenuID2, "\p" );
  166. ===================================================================================
  167. File “os_mac_Print.c”; Line 103
  168. Error:   argument to function ‘PenPat’ does not match prototype
  169. =-=
  170.     PenMode(patCopy);PenSize(1,1);PenPat( (ConstPatternParam )&qd.black );
  171. ===
  172. File “os_mac_Print.c”; Line 137
  173. Error:   argument to function ‘GetDateTime’ does not match prototype
  174. =-=
  175.     unsigned long    time;
  176. ===
  177. File “os_mac_Print.c”; Line 168
  178. Error:   second argument to function ‘NumToString’ does not match prototype
  179. =-=
  180.             NumToString( ePrintPage, tStr );
  181. ===
  182. File “os_mac_Print.c”; Line 169
  183. Error:   argument to function ‘DrawString’ does not match prototype
  184. =-=
  185.             DrawString( tStr );
  186. ===================================================================================
  187.